package com.yycx.module.bus.provider.handler.haiying.salemanbalance.tasktodo;

import com.yycx.common.base.entity.EntityMap;
import com.yycx.common.mybatis.interceptor.DeleteInterceptor;
import com.yycx.common.mybatis.query.CriteriaDelete;
import com.yycx.module.bus.provider.service.hy.HyOrderDetailService;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.io.Serializable;

/**
 * 退保证金删除
 *
 * @author zyf
 */
@Component
public class RefundBondPaymentDeleteHandler implements DeleteInterceptor {

    @Resource
    private HyOrderDetailService orderDetailsService;


    @Override
    public void prepare(CriteriaDelete criteriaDelete, EntityMap entityMap) {

    }

    @Override
    public void complete(CriteriaDelete cd, EntityMap params) {
        Serializable paymentId = cd.getIdValue();
        orderDetailsService.clearRefundBondId(paymentId);
    }
}
